<?php


namespace App\Services\Business\Services;


use App\Services\Base\Interfaces\ConfigServiceInterface;
use App\Services\Base\Services\ConfigService;
use App\Services\Business\Interfaces\ConquerServiceInterface;
use App\Services\Business\Models\Conquer;

class ConquerService implements ConquerServiceInterface
{
    /**
     * @var ConfigService
     */
    protected $configService;

    public function __construct(ConfigServiceInterface $configService)
    {
        $this->configService = $configService;

    }

    public function  getRecommendConquer()
    {

        return  Conquer::query()
            ->with(['user:id,nick_name,avatar'])
            ->where('is_recommend',1)
            ->where('is_public',1)
            ->orderBy('created_at', 'desc')->take(8)->get()->toArray();

    }

}
